<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Chapter&nbsp;5.&nbsp;部署</title>
    <link rel="stylesheet" href="css/html.css" type="text/css">
    <meta name="generator" content="DocBook XSL Stylesheets V1.65.1">
    <link rel="home" href="index.html" title="JBoss jBPM 3.1">
    <link rel="up" href="index.html" title="JBoss jBPM 3.1">
    <link rel="previous" href="graphorientedprogramming.html" title="Chapter&nbsp;4.&nbsp;Graph Oriented Programming">
    <link rel="next" href="configuration.html" title="Chapter&nbsp;6.&nbsp;Configuration">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="navheader">
    <table width="100%" summary="Navigation header">
        <tr>
            <th colspan="3" align="center">Chapter&nbsp;5.&nbsp;部署</th>
        </tr>
        <tr>
            <td width="20%" align="left"><a accesskey="p" href="graphorientedprogramming.html">Prev</a>&nbsp;</td>
            <th width="60%" align="center">&nbsp;</th>
            <td width="20%" align="right">&nbsp;<a accesskey="n" href="configuration.html">Next</a></td>
        </tr>
    </table>
    <hr>
</div>
<div class="chapter" lang="cn">
    <div class="titlepage">
        <div>
            <div><h2 class="title"><a name="deployment"></a>Chapter&nbsp;5.&nbsp;部署</h2></div>
        </div>
        <div></div>
    </div>
    <p>jBPM is an embeddable BPM engine, which means that you can take jBPM and
        embed it into your own java project, rather then installing a separate product
        and integrate with it. One of the key aspects that make this possible is
        minimizing the dependencies. This chapter discusses the jbpm libraries and
        their dependencies.
    </p>

    <div class="section" lang="cn">
        <div class="titlepage">
            <div>
                <div><h2 class="title" style="clear: both"><a name="javaruntimeenvironment"></a>5.1.&nbsp;Java 运行时环境</h2></div>
            </div>
            <div></div>
        </div>
        <p>jBPM 3 requires J2SE 1.4.2+
        </p></div>
    <div class="section" lang="cn">
        <div class="titlepage">
            <div>
                <div><h2 class="title" style="clear: both"><a name="jbpmlibraries"></a>5.2.&nbsp;jBPM 类库</h2>
                </div>
            </div>
            <div></div>
        </div>
        <p><span class="bold"><b>jbpm-[version].jar</b></span> is the library
            with the core jbpm functionality.
        </p>

        <p><span class="bold"><b>jbpm-identity-[version].jar</b></span> is the
            (optional) library containing an identity component as described in
            <a href="taskmanagement.html#theidentitycomponent" title="11.11.&nbsp;The identity component">Section&nbsp;11.11,
                &#8220;The identity component&#8221;</a>.
        </p></div>
    <div class="section" lang="cn">
        <div class="titlepage">
            <div>
                <div><h2 class="title" style="clear: both"><a name="thirdpartylibraries"></a>5.3.&nbsp;第三方类库</h2></div>
            </div>
            <div></div>
        </div>
        <p>In a minimal deployment, you can create and run processes with jBPM
            by putting only the commons-logging and dom4j library in your classpath.
            Beware that persisting processes to a database is not supported. The
            dom4j library can be removed if you don't use the process xml parsing,
            but instead build your object graph programatically.
        </p>

        <div class="table"><a name="minimal.dependencies.table"></a>

            <p class="title"><b>Table&nbsp;5.1.&nbsp;</b></p>
            <table border="1">
                <colgroup>
                    <col>
                    <col>
                    <col>
                </colgroup>
                <thead>
                    <tr>
                        <th align="center">Library</th>
                        <th align="center">Usage</th>
                        <th align="center">Description</th>
                        <th align="center">Directory</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>commons-logging.jar</td>
                        <td>logging in jbpm and hibernate</td>
                        <td>The jBPM code logs to commons logging. The commons logging
                            library can be configured to dispatch the logs to e.g.
                            java 1.4 logging, log4j, ... See
                            <a href="http://jakarta.apache.org/commons/logging/guide.html" target="_top">
                                the apache commons user guide</a> for more information on how
                            to configure commons logging. if you're used to log4j, the easiest
                            way is to put the log4j lib and a log4j.properties in the classpath.
                            commons logging will automatically detect this and use that configuration.
                        </td>
                        <td><tt class="literal">lib/jboss (from jboss 4.0.3)</tt></td>
                    </tr>
                    <tr>
                        <td>dom4j-1.6.1.jar</td>
                        <td>process definitions and hibernate persistence</td>
                        <td>xml parsing</td>
                        <td><tt class="literal">lib/dom4j</tt></td>
                    </tr>
                </tbody>
            </table>
        </div>
        <p>A typical deployment for jBPM will include persistent storage of
            process definitions and process executions. In that case, jBPM does
            not have any dependencies outside hibernate and its dependent libraries.
        </p>

        <p>Of course, hibernate's required libraries depend on the environment
            and what features you use. For details refer to the hibernate
            documentation. The next table gives an indication for a plain
            standalone POJO development environment.
        </p>

        <p>jBPM is distributed with hibernate 3.1 final. But it can also work
            with 3.0.x. In that case, you might have to update a few hibernate
            queries in the hibernate.queries.hbm.xml configuration file. For more
            info about customizing queries, see <a href="persistence.html#customizingqueries"
                                                   title="7.6.&nbsp;Customizing queries">Section&nbsp;7.6, &#8220;Customizing
            queries&#8221;</a>
        </p>

        <div class="table"><a name="typical.dependencies.table"></a>

            <p class="title"><b>Table&nbsp;5.2.&nbsp;</b></p>
            <table border="1">
                <colgroup>
                    <col>
                    <col>
                    <col>
                </colgroup>
                <thead>
                    <tr>
                        <th align="center">Library</th>
                        <th align="center">Usage</th>
                        <th align="center">Description</th>
                        <th align="center">Directory</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>hibernate3.jar</td>
                        <td>hibernate persistence</td>
                        <td>the best O/R mapper</td>
                        <td><tt class="literal">lib/hibernate (hibernate 3.1 final)</tt></td>
                    </tr>
                    <tr>
                        <td>antlr-2.7.5H3.jar</td>
                        <td>used in query parsing by hibernate persistence</td>
                        <td>parser library</td>
                        <td><tt class="literal">lib/jboss (from jboss 4.0.3)</tt></td>
                    </tr>
                    <tr>
                        <td>cglib-2.1_2jboss.jar</td>
                        <td>hibernate persistence</td>
                        <td>reflection library used for hibernate proxies</td>
                        <td><tt class="literal">lib/jboss (from jboss 4.0.3)</tt></td>
                    </tr>
                    <tr>
                        <td>commons-collections.jar</td>
                        <td>hibernate persistence</td>
                        <td>&nbsp;</td>
                        <td><tt class="literal">lib/jboss (from jboss 4.0.3)</tt></td>
                    </tr>
                    <tr>
                        <td>ehcache-1.1.jar</td>
                        <td>hibernate persistence (in the default configuration)</td>
                        <td>second level cache implementation. When configuring a different
                            cache provider for hibernate, this library is not required.
                        </td>
                        <td><tt class="literal">lib/hibernate</tt></td>
                    </tr>
                    <tr>
                        <td>jaxen-1.1-beta-4.jar</td>
                        <td>process definitions and hibernate persistence</td>
                        <td>XPath library (used by dom4j)</td>
                        <td><tt class="literal">lib/hibernate</tt></td>
                    </tr>
                    <tr>
                        <td>jdbc2_0-stdext.jar</td>
                        <td>hibernate persistence</td>
                        <td>&nbsp;</td>
                        <td><tt class="literal">lib/hibernate</tt></td>
                    </tr>
                    <tr>
                        <td>asm.jar</td>
                        <td>hibernate persistence</td>
                        <td>asm byte code library</td>
                        <td><tt class="literal">lib/hibernate</tt></td>
                    </tr>
                    <tr>
                        <td>asm-attrs.jar</td>
                        <td>hibernate persistence</td>
                        <td>asm byte code library</td>
                        <td><tt class="literal">lib/hibernate</tt></td>
                    </tr>
                </tbody>
            </table>
        </div>
        <p>The beanshell library is optional. If you don't include it, you won't be
            able to use the beanshell integration in the jbpm process language and you
            you'll get a log message saying that jbpm couldn't load the Script class
            and hence, the script element won't be available.
        </p>

        <div class="table"><a name="optional.dependencies.table"></a>

            <p class="title"><b>Table&nbsp;5.3.&nbsp;</b></p>
            <table border="1">
                <colgroup>
                    <col>
                    <col>
                    <col>
                </colgroup>
                <thead>
                    <tr>
                        <th align="center">Library</th>
                        <th align="center">Usage</th>
                        <th align="center">Description</th>
                        <th align="center">Directory</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>bsh-1.3.0.jar</td>
                        <td>beanshell script interpreter</td>
                        <td>Only used in the script's and decision's. When you don't use
                            these process elements, the beanshell lib can be removed, but then you
                            have to comment out the Script.hbm.xml mapping line in the
                            <tt class="literal">hibernate.cfg.xml</tt></td>
                        <td><tt class="literal">lib/jboss</tt></td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>
<div class="navfooter">
    <hr>
    <table width="100%" summary="Navigation footer">
        <tr>
            <td width="40%" align="left"><a accesskey="p" href="graphorientedprogramming.html">Prev</a>&nbsp;</td>
            <td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td>
            <td width="40%" align="right">&nbsp;<a accesskey="n" href="configuration.html">Next</a></td>
        </tr>
        <tr>
            <td width="40%" align="left" valign="top">Chapter&nbsp;4.&nbsp;面向图的编程&nbsp;</td>
            <td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td>
            <td width="40%" align="right" valign="top">&nbsp;Chapter&nbsp;6.&nbsp;配置</td>
        </tr>
    </table>
</div>
</body>
</html>